import { SavedWebsites, Website } from './SavedWebsites'

export default {
  component: SavedWebsites
}

const sampleWebsites: Website[] = [
  {
    url: 'https://example.com/1',
    title: 'Example Website 1',
    content: 'This is the content of example website 1.'
  },
  {
    url: 'https://example.com/2',
    title: 'Example Website with a Very Long Title That Should be Truncated',
    content: 'This is the content of example website 2.',
    favicon:
      ''
  },
  {
    url: 'https://example.com/3',
    title: 'Example Website 3',
    content: 'This is the content of example website 3.',
    favicon:
      ''
  }
]

export const Default = () => (
  <SavedWebsites
    websites={sampleWebsites}
    on_delete={(url) => console.log('Delete website:', url)}
    on_link_click={(url) => console.log('Link click:', url)}
  />
)
